solve for x in trig equations